import { createRouter, createWebHistory } from 'vue-router'
import SearchView from '@/layouts/SearchView.vue'
import StudentInfoPage from '@/layouts/StudentInfoPage.vue'

const routes = [
    {
        path: '/',
        name: 'home',
        component: SearchView,
    },
    {
        path: '/student/:id',
        name: 'StudentInfoPage',
        component: StudentInfoPage,
        props: true,
    },
    {
        path: '/students',
        name: 'SeniorSearch',
        component: () => import('@/components/SeniorSearch'),
    },
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes,
})

export default router
